<?php

$u = new Model('user_type');
$types = $u->order('typeid')->list_all();
if (Request::post()) {
    $uu_arr = array();
    foreach ($types as $v) {
        $uu_arr[$v->id] = $v;
    }
    foreach ($_POST as $k => $v) {
        if (strpos($k, '@')) {
            $kk = explode('@', $k);
            $uu = $uu_arr[$kk[1]];
            $uu->{$kk[0]} = $v;
            $uu->save();
        }
    }
    tusi('设置成功');
}
